Developer Documentation

QuickTime 4 API Documentation

Wired Movies and Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Authoring Wired Movies

In addition to providing functions that allow you to create and manipulate a sprite animation as a track in a QuickTime movie, the sprite media handler also provides functions that allow your application to create and manipulate a wired sprite movie, with various types of user interactivity.

The following sections are illustrated with code from the sample program QTWiredSprites.c , which shows how to create a sample wired sprite movie containing one sprite track. (A partial code listing is available in Appendix  . You can download the full sample code at QuickTime Web site at http://www.apple.com/quicktime/developers/samplecode.html#sprites .)

The sample code creates a 320 by 240 pixel wired movie with one sprite track that contains six sprites, two of which are penguins and four of which are buttons. Figure 3-1 shows two penguins at the outset of the movie, with the buttons invisible.

Figure 1 Two penguins from a sample program

Initially, the four buttons in the wired movie are invisible. When the mouse enters or "rolls over" a button, it appears, as shown in Figure 3-2 .

Figure 2 Two penguins and four buttons, indicating various directions in the movie

When the mouse is clicked inside a button, its images change to its "pressed" image. When the mouse is released, its image is changed back to its "unpressed" image. If the mouse is released inside the button, it triggers an action. The buttons perform the following set of actions:

Actions of the First Penguin

Actions of the Second Penguin

Creating a Wired Sprite Movie


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |